{% extends "base.html" %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card shadow">
            <div class="card-header">
                <h4 class="mb-0">添加新藏品</h4>
            </div>
            <div class="card-body">
                <form method="POST" enctype="multipart/form-data">
                    <div class="mb-3">
                        <label for="name" class="form-label">藏品名称</label>
                        <input type="text" class="form-control" id="name" name="name" required>
                    </div>
                    
                    <div class="mb-3">
                        <label for="era" class="form-label">年代</label>
                        <input type="text" class="form-control" id="era" name="era" required>
                    </div>
                    
                    <div class="mb-3">
                        <label for="dimensions" class="form-label">尺寸</label>
                        <input type="text" class="form-control" id="dimensions" name="dimensions" required>
                    </div>
                    
                    <div class="mb-3">
                        <label for="price" class="form-label">优惠价</label>
                        <input type="text" class="form-control" id="price" name="price">
                        <div class="form-text">例如：¥1,000 或 ￥1,000</div>
                    </div>
                    
                    <div class="mb-3">
                        <label for="sort_order" class="form-label">排序顺序</label>
                        <input type="number" class="form-control" id="sort_order" name="sort_order" value="0">
                        <div class="form-text">数字越大越靠前显示</div>
                    </div>
                    
                    <div class="mb-3">
                        <label for="description" class="form-label">藏品描述</label>
                        <textarea class="form-control" id="description" name="description" rows="4" required></textarea>
                    </div>
                    
                    <div class="mb-3">
                        <label for="images" class="form-label">藏品图片（可多选）</label>
                        <input type="file" class="form-control" id="images" name="images" multiple accept="image/*" required>
                        <div class="form-text">第一张图片将作为主图显示在列表页面</div>
                    </div>
                    
                    <div class="d-flex justify-content-between">
                        <a href="{{ url_for('admin_dashboard') }}" class="btn btn-secondary">返回</a>
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %} 